package net.message;

import com.msg.MsgMain;
import game.Client;
import io.netty.channel.Channel;
import io.netty.util.AttributeKey;
import lombok.Data;

/**
 * 传给业务层的协议包
 * 包含协议内容及session
 */
@Data
public class MsgPack {
    private MsgMain.MainProtocl mainProtocl;
    private Channel channel;
    private int msgIndex;
    private static AttributeKey<String> key = AttributeKey.valueOf("token");//依附于Channel。共生
    private Client client;

    public MsgPack(int msgIndex, MsgMain.MainProtocl mainProtocl, Channel channel, Client client) {
        this.mainProtocl = mainProtocl;
        this.channel = channel;
        this.msgIndex = msgIndex;
        this.client = client;
    }
}
